<template>
  <div class="Pagecontent d_jc_ac">
   <div class="lastTime d_jc_ac" @click="lastTime()"><span class="pageItem iconfont icon-shangyiye d_jc_ac"></span></div>

   <template>
     <div class="Next d_jc_ac" @click="Next()"><span class="pageItem iconfont icon-xiayiye d_jc_ac"></span></div>
   </template>
  </div>
</template>

<script>
import { ArticleList } from '../../../../api/api.js';
export default {
  data () {
    return {
      PageSize: 10,
      PageNum: 1,
      isShowNext: true
    }
  },
  methods: {
    lastTime () {

    },
    async Next () {
      this.PageNum++;
      await ArticleList(this.PageSize, this.PageNum).then(res => {
        if (res.result.data.length != 0) {
          console.log("数组长度", res.result.data.length);
          console.log(res.result.data);
          this.PageSize += res.result.data.length;
          this.$emit("PageArticleList", res.result.data);
          return
        }
        console.log("没有数据了，数组长度 -> ", res.result.data.length);
      });
    }
  }
}
</script>

<style lang="less">
.d_jc_ac {
  display: flex;
  justify-content: center;
  align-items: center;
}
.Pagecontent {
  font-size: 30px;
  .lastTime {
    .pageItem {
      width: 50px;
      height: 50px;
      background-color: #bcbc;
      border-radius: 50%;
      margin: 10px;
      cursor: pointer;
    }
  }
  .Next {
    .pageItem {
      cursor: pointer;
      width: 50px;
      height: 50px;
      background-color: #bcbc;
      border-radius: 50%;
      margin: 10px;
    }
  }
}
</style>